import 'package:flutter/material.dart';
import 'package:webview_flutter/webview_flutter.dart';

/// 
/// @Description 
/// @Author WuJianFeng
/// @Date 2024/3/15 16:42
/// 

class MyWebView extends StatefulWidget{
  MyWebView(this.url,{super.key});
  String url;

  @override
  State<StatefulWidget> createState() => _MyWebViewState();
  
}

class _MyWebViewState extends State<MyWebView>{
  late final WebViewController controller;
  double height = 0;

  @override
  void initState() {
    controller = WebViewController()
      ..setJavaScriptMode(JavaScriptMode.unrestricted)
      ..loadRequest(Uri.parse(widget.url));

    super.initState();
  }
  @override
  Widget build(BuildContext context) {
    return WebViewWidget(controller: controller);
  }
  
}
 
 